<template>
  <div>
    <h1>vue-router-setup</h1>
    <hr>
    <button @click="goto('/home')">首页</button>
    <br>
    <button @click="goto('/list')">列表</button>
    <RouterView></RouterView>
  </div>
</template>
<script setup>
  import { useRouter } from 'vue-router'

  const router = useRouter()

  const goto = (path) =>{
    router.push(path)
  }
</script>
